package com.itheima.Day5;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Time {
    public static void main(String[] args) throws ParseException {
        String name = "皮震亚";
        String s = "1997-8-25";
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        Date brithday = sdf.parse(s);
        long time1 = brithday.getTime();
        Date now = new Date();
        long time2 = now.getTime();
        long day = (time2-time1)/1000/60/60/24;
        System.out.println(name+"到现在活了"+day+"天");
    }
}